package yhao.demo.autocode.core.method;

import java.util.ArrayList;
import java.util.List;

public class FormInfo {
    private String formName;
    private boolean isCustom;
    private String extendsForm;
    private List<FormFieldInfo> fieldList = new ArrayList<>();

    /**
     * @param formName form类名
     * @param isCustom 是否是自定义Form类，若是系统已存在的form，则填false
     */
    public FormInfo(String formName,boolean isCustom) {
        this.formName = formName;
        this.isCustom = isCustom;
    }

    public String getFormName() {
        return formName;
    }

    public String getExtendsForm() {
        return extendsForm;
    }

    /**
     * 可不写，不写则直接实现ValidationForm
     * @param extendsForm
     */
    public void setExtendsForm(String extendsForm) {
        this.extendsForm = extendsForm;
    }

    public List<FormFieldInfo> getFieldList() {
        return fieldList;
    }

    public void addField(FormFieldInfo fieldInfo) {
        this.fieldList.add(fieldInfo);
    }

    public boolean isCustom() {
        return isCustom;
    }
}
